using IM.Easy.Entity.System;
using IM.Easy.Infrastructure.Query;
using System.ComponentModel.DataAnnotations;


namespace IM.Easy.SystemServices.Dtos
{
    /// <summary>
    /// API权限管理表查询实体
    /// </summary>
    public class ApiPermissionsQueryDto : QueryBase
    {
        /// <summary>
        /// 接口名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 接口路径
        /// </summary>
        public string Path { get; set; }

        /// <summary>
        /// 权限字符串
        /// </summary>
        public string PermissionKey { get; set; }

        /// <summary>
        /// 启用状态
        /// </summary>
        public bool? IsEnabled { get; set; }
    }

    public class DiffApiPermissions
    {
        public List<ApiPermissions> Added { get; set; }

        public List<ApiPermissions> Deleted { get; set; }

    }

    /// <summary>
    /// API权限管理表dto
    /// </summary>
    public class ApiPermissionsDto
    {
        /// <summary>
        /// 主键ID，唯一标识
        /// </summary>
        public long Id { get; set; }
        /// <summary>
        /// 接口路径
        /// </summary>
        public string Path { get; set; }
        /// <summary>
        /// 请求方法
        /// </summary>
        public string HttpMethod { get; set; }
        /// <summary>
        /// 权限字符串
        /// </summary>
        public string PermissionKey { get; set; }
        /// <summary>
        /// 启用状态
        /// </summary>
        public bool IsEnabled { get; set; }
    }
}
